#include "../include/FireworkLittleLines.h"

#include <algorithm>
#include <iterator>

#include "../include/utilities.h"

void FireworkLittleLines::initFireworkParticles() {
	
	std::uniform_int_distribution<> lineCountDis(50, 100);
	std::normal_distribution<float> speedDis(10, 5);
	std::uniform_int_distribution<> lengthDis(-2, 0);
	
	uint8_t lineCount = lineCountDis(m_gen);
	std::vector<Vector3> speedList;
	for (int i = 0; i < lineCount; ++i) {
		float initSpeed = 60 + speedDis(m_gen);
		Vector3 normal = getRandomNormal(45, 90, 0, 360);
		Vector3 speed = Vector3Scale(normal, initSpeed);
		speedList.push_back(speed);
	}
	Color color = getRandomColor();
	addNewBombs(m_pos, speedList, color, 3 + lengthDis(m_gen));
}
